import java.awt.Color;
import java.awt.Font;
import java.util.Vector;


public class ClassGraphicObject {
	int xco; 
	int yco; 
	String classname; 
	Vector<String> attributes; 
	
	
	public ClassBlock(int x, int y, String name, Vector<String> att){
		xco = x;
		yco = y;
		classname = name;
		attributes = att;
	}
	
	public void drawClass(Graphics g){
	    Font title = new Font("serif", Font.PLAIN, 45);
	    Font attr = new Font ("serif", Font.PLAIN, 20);
	    g.setColor(Color.lightGray);
	    g.fillRect(xco, yco, 500, 50);
	    g.setColor(Color.black);
	    g.drawRect(xco, yco, 500, 500);
	    g.setFont(title);
	    g.drawString(classname, xco + 5, yco + 40);
	    g.setFont(attr);
	    for(int n=0;n < attributes.size(); n++ ){
	    	g.drawString(attributes.elementAt(n), xco, yco + 20 + 10*n);
	    	
	    }
	}
	

}
